﻿using FluentMigrator;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Coevery.Database.Migrations
{
    [Migration(20121025153522)]
    public class _20121025153522_UpdateProjectDefaultListLayoutXml : Migration
    {
        public override void Up()
        {
            string layoutXml = "<XtraSerializer version=\"1.0\" application=\"View\">    <property name=\"#LayoutVersion\" />    <property name=\"GroupPanelText\" />    <property name=\"NewItemRowText\" />    <property name=\"GroupFooterShowMode\">VisibleIfExpanded</property>    <property name=\"LevelIndent\">-1</property>    <property name=\"PreviewIndent\">-1</property>    <property name=\"PreviewLineCount\">-1</property>    <property name=\"BestFitMaxRowCount\">-1</property>    <property name=\"ScrollStyle\">LiveVertScroll, LiveHorzScroll</property>    <property name=\"FocusRectStyle\">RowFocus</property>    <property name=\"HorzScrollStep\">3</property>    <property name=\"PreviewFieldName\" />    <property name=\"ViewCaptionHeight\">-1</property>    <property name=\"ShowButtonMode\">ShowForFocusedCell</property>    <property name=\"Columns\" iskey=\"true\" value=\"23\">      <property name=\"Item1\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">1</property>        <property name=\"Width\">104</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colName</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"FixedWidth\">true</property>        </property>        <property name=\"Caption\">Name</property>        <property name=\"FieldName\">Name</property>      </property>      <property name=\"Item2\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">6</property>        <property name=\"Width\">62</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colStatusCode</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"FixedWidth\">true</property>        </property>        <property name=\"Caption\">StatusCode</property>        <property name=\"FieldName\">StatusCode</property>      </property>      <property name=\"Item3\" isnull=\"true\" iskey=\"true\">        <property name=\"ColumnEditName\" />        <property name=\"Name\">colDescription</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"FixedWidth\">true</property>        </property>        <property name=\"Caption\">Description</property>        <property name=\"FieldName\">Description</property>      </property>      <property name=\"Item4\" isnull=\"true\" iskey=\"true\">        <property name=\"DisplayFormat\" isnull=\"true\" iskey=\"true\">          <property name=\"FormatString\">{0:d}</property>          <property name=\"FormatType\">DateTime</property>        </property>        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">14</property>        <property name=\"Width\">77</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colModifiedOn</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"FixedWidth\">true</property>        </property>        <property name=\"FieldName\">ModifiedOn</property>      </property>      <property name=\"Item5\" isnull=\"true\" iskey=\"true\">        <property name=\"DisplayFormat\" isnull=\"true\" iskey=\"true\">          <property name=\"FormatString\">{0:d}</property>          <property name=\"FormatType\">DateTime</property>        </property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colCreatedOn</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"FixedWidth\">true</property>        </property>        <property name=\"FieldName\">CreatedOn</property>      </property>      <property name=\"Item6\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">7</property>        <property name=\"Width\">58</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colQuoteWorkHours</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"FixedWidth\">true</property>        </property>        <property name=\"FieldName\">QuoteWorkHours</property>        <property name=\"Summary\" iskey=\"true\" value=\"1\">          <property name=\"Item1\" isnull=\"true\" iskey=\"true\">            <property name=\"FieldName\">QuoteWorkHours</property>            <property name=\"Tag\" isnull=\"true\" />            <property name=\"DisplayFormat\">{0:0.00}</property>            <property name=\"SummaryType\">Sum</property>          </property>        </property>      </property>      <property name=\"Item7\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">8</property>        <property name=\"Width\">52</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colActualWorkHours</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"FixedWidth\">true</property>        </property>        <property name=\"FieldName\">ActualWorkHours</property>        <property name=\"Summary\" iskey=\"true\" value=\"1\">          <property name=\"Item1\" isnull=\"true\" iskey=\"true\">            <property name=\"FieldName\">ActualWorkHours</property>            <property name=\"Tag\" isnull=\"true\" />            <property name=\"DisplayFormat\">{0:0.00}</property>            <property name=\"SummaryType\">Sum</property>          </property>        </property>      </property>      <property name=\"Item8\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">9</property>        <property name=\"Width\">56</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colActualInput</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"FixedWidth\">true</property>        </property>        <property name=\"FieldName\">ActualInput</property>        <property name=\"Summary\" iskey=\"true\" value=\"1\">          <property name=\"Item1\" isnull=\"true\" iskey=\"true\">            <property name=\"FieldName\">ActualInput</property>            <property name=\"Tag\" isnull=\"true\" />            <property name=\"DisplayFormat\">{0:0.00}</property>            <property name=\"SummaryType\">Sum</property>          </property>        </property>      </property>      <property name=\"Item9\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">10</property>        <property name=\"Width\">53</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colEffort</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"FixedWidth\">true</property>        </property>        <property name=\"FieldName\">Effort</property>        <property name=\"Summary\" iskey=\"true\" value=\"1\">          <property name=\"Item1\" isnull=\"true\" iskey=\"true\">            <property name=\"FieldName\">Effort</property>            <property name=\"Tag\" isnull=\"true\" />            <property name=\"DisplayFormat\">{0:0.00}</property>            <property name=\"SummaryType\">Sum</property>          </property>        </property>      </property>      <property name=\"Item10\" isnull=\"true\" iskey=\"true\">        <property name=\"ColumnEditName\" />        <property name=\"Name\">colOvertime</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"FixedWidth\">true</property>        </property>        <property name=\"FieldName\">Overtime</property>        <property name=\"Summary\" iskey=\"true\" value=\"1\">          <property name=\"Item1\" isnull=\"true\" iskey=\"true\">            <property name=\"FieldName\">Overtime</property>            <property name=\"Tag\" isnull=\"true\" />            <property name=\"DisplayFormat\">{0:0.00}</property>            <property name=\"SummaryType\">Sum</property>          </property>        </property>      </property>      <property name=\"Item11\" isnull=\"true\" iskey=\"true\">        <property name=\"DisplayFormat\" isnull=\"true\" iskey=\"true\">          <property name=\"FormatString\">{0:d}</property>          <property name=\"FormatType\">DateTime</property>        </property>        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">11</property>        <property name=\"Width\">67</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colStartDate</property>        <property name=\"Caption\">StartDate</property>        <property name=\"FieldName\">StartDate</property>      </property>      <property name=\"Item12\" isnull=\"true\" iskey=\"true\">        <property name=\"DisplayFormat\" isnull=\"true\" iskey=\"true\">          <property name=\"FormatString\">{0:d}</property>          <property name=\"FormatType\">DateTime</property>        </property>        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">12</property>        <property name=\"Width\">67</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colEndDate</property>        <property name=\"Caption\">EndDate</property>        <property name=\"FieldName\">EndDate</property>      </property>      <property name=\"Item13\" isnull=\"true\" iskey=\"true\">        <property name=\"ColumnEditName\" />        <property name=\"Name\">colCreatedById</property>        <property name=\"FieldName\">CreatedById</property>      </property>      <property name=\"Item14\" isnull=\"true\" iskey=\"true\">        <property name=\"ColumnEditName\" />        <property name=\"Name\">colModifiedById</property>        <property name=\"FieldName\">ModifiedById</property>      </property>      <property name=\"Item15\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">13</property>        <property name=\"Width\">71</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colOwnerId</property>        <property name=\"FieldName\">OwnerId</property>      </property>      <property name=\"Item16\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">2</property>        <property name=\"Width\">134</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colProjectId</property>        <property name=\"FieldName\">ProjectId</property>      </property>      <property name=\"Item17\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">3</property>        <property name=\"Width\">71</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colProjectIterationId</property>        <property name=\"FieldName\">ProjectIterationId</property>      </property>      <property name=\"Item18\" isnull=\"true\" iskey=\"true\">        <property name=\"UnboundExpression\">[QuoteWorkHours]/[ActualWorkHours]</property>        <property name=\"UnboundType\">Decimal</property>        <property name=\"DisplayFormat\" isnull=\"true\" iskey=\"true\">          <property name=\"FormatString\">{0:0%}</property>          <property name=\"FormatType\">Numeric</property>        </property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colEvaluateExactlyRate</property>        <property name=\"Caption\">EvaluateExactlyRate</property>        <property name=\"FieldName\">colEvaluateExactlyRate</property>      </property>      <property name=\"Item19\" isnull=\"true\" iskey=\"true\">        <property name=\"UnboundExpression\">[Effort]/[ActualInput]</property>        <property name=\"UnboundType\">Decimal</property>        <property name=\"DisplayFormat\" isnull=\"true\" iskey=\"true\">          <property name=\"FormatString\">{0:0%}</property>          <property name=\"FormatType\">Numeric</property>        </property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colInputEffortRate</property>        <property name=\"Caption\">InputEffortRate</property>        <property name=\"FieldName\">colInputEffortRate</property>      </property>      <property name=\"Item20\" isnull=\"true\" iskey=\"true\">        <property name=\"UnboundExpression\">[ActualWorkHours]-[Effort]</property>        <property name=\"UnboundType\">Decimal</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colRemainderTime</property>        <property name=\"Caption\">RemainderTime</property>        <property name=\"FieldName\">colRemainderTime</property>        <property name=\"Summary\" iskey=\"true\" value=\"1\">          <property name=\"Item1\" isnull=\"true\" iskey=\"true\">            <property name=\"FieldName\">colRemainderTime</property>            <property name=\"Tag\" isnull=\"true\" />            <property name=\"DisplayFormat\">{0:0.00}</property>            <property name=\"SummaryType\">Sum</property>          </property>        </property>      </property>      <property name=\"Item21\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">5</property>        <property name=\"Width\">57</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">Priority</property>        <property name=\"Caption\">Priority</property>        <property name=\"FieldName\">PriorityCode</property>      </property>      <property name=\"Item22\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">4</property>        <property name=\"Width\">83</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colProjectModuleId</property>        <property name=\"Caption\">ProjectModule</property>        <property name=\"FieldName\">ProjectModuleId</property>      </property>      <property name=\"Item23\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">0</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colTaskNumber</property>        <property name=\"Caption\">TaskNumber</property>        <property name=\"FieldName\">TaskNumber</property>      </property>    </property>    <property name=\"ViewCaption\" />    <property name=\"BorderStyle\">Default</property>    <property name=\"SynchronizeClones\">true</property>    <property name=\"DetailTabHeaderLocation\">Top</property>    <property name=\"Name\">gridView1</property>    <property name=\"DetailHeight\">350</property>    <property name=\"ActiveFilterEnabled\">true</property>    <property name=\"VertScrollTipFieldName\" />    <property name=\"GroupFormat\">{0}: [#image]{1} {2}</property>    <property name=\"OptionsView\" isnull=\"true\" iskey=\"true\">      <property name=\"ShowFilterPanelMode\">Never</property>      <property name=\"ShowIndicator\">false</property>      <property name=\"ShowGroupPanel\">false</property>      <property name=\"ShowFooter\">true</property>      <property name=\"WaitAnimationOptions\">Panel</property>      <property name=\"ColumnAutoWidth\">false</property>    </property>    <property name=\"OptionsBehavior\" isnull=\"true\" iskey=\"true\">      <property name=\"Editable\">false</property>      <property name=\"AllowIncrementalSearch\">true</property>    </property>    <property name=\"FixedLineWidth\">2</property>    <property name=\"OptionsDetail\" isnull=\"true\" iskey=\"true\">      <property name=\"EnableMasterViewMode\">false</property>    </property>    <property name=\"ChildGridLevelName\" />    <property name=\"IndicatorWidth\">-1</property>    <property name=\"OptionsSelection\" isnull=\"true\" iskey=\"true\">      <property name=\"EnableAppearanceFocusedCell\">false</property>    </property>    <property name=\"ColumnPanelRowHeight\">-1</property>    <property name=\"VertScrollVisibility\">Auto</property>    <property name=\"GroupRowHeight\">-1</property>    <property name=\"HorzScrollVisibility\">Auto</property>    <property name=\"FooterPanelHeight\">-1</property>    <property name=\"RowSeparatorHeight\">0</property>    <property name=\"RowHeight\">-1</property>    <property name=\"ActiveFilterString\" />    <property name=\"GroupSummary\" iskey=\"true\" value=\"0\" />    <property name=\"SortInfo\">~Xtra#Base64AAEAAAD/////AQAAAAAAAAAMAgAAAF1EZXZFeHByZXNzLlh0cmFHcmlkLnYxMi4xLCBWZXJzaW9uPTEyLjEuNy4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI4OGQxNzU0ZDcwMGU0OWEFAQAAADhEZXZFeHByZXNzLlh0cmFHcmlkLkNvbHVtbnMuR3JpZENvbHVtblNvcnRJbmZvQ29sbGVjdGlvbgQAAAAKZ3JvdXBDb3VudAVjbG9uZQ9jbG9uZUdyb3VwQ291bnQTQ29sbGVjdGlvbkJhc2UrbGlzdAADAAMIsgFTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW0RldkV4cHJlc3MuWHRyYUdyaWQuQ29sdW1ucy5HcmlkQ29sdW1uU29ydEluZm8sIERldkV4cHJlc3MuWHRyYUdyaWQudjEyLjEsIFZlcnNpb249MTIuMS43LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YV1dCBxTeXN0ZW0uQ29sbGVjdGlvbnMuQXJyYXlMaXN0AgAAAAAAAAAJAwAAAAAAAAAJBAAAAAQDAAAAsgFTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW0RldkV4cHJlc3MuWHRyYUdyaWQuQ29sdW1ucy5HcmlkQ29sdW1uU29ydEluZm8sIERldkV4cHJlc3MuWHRyYUdyaWQudjEyLjEsIFZlcnNpb249MTIuMS43LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YV1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAwRGV2RXhwcmVzcy5YdHJhR3JpZC5Db2x1bW5zLkdyaWRDb2x1bW5Tb3J0SW5mb1tdAgAAAAgICQUAAAAAAAAAAAAAAAQEAAAAHFN5c3RlbS5Db2xsZWN0aW9ucy5BcnJheUxpc3QDAAAABl9pdGVtcwVfc2l6ZQhfdmVyc2lvbgUAAAgICQYAAAABAAAABAAAAAcFAAAAAAEAAAAAAAAABC5EZXZFeHByZXNzLlh0cmFHcmlkLkNvbHVtbnMuR3JpZENvbHVtblNvcnRJbmZvAgAAABAGAAAABAAAAAkHAAAADQMMCAAAABlEZXZFeHByZXNzLlh0cmFHcmlkLnYxMi4xBQcAAAAuRGV2RXhwcmVzcy5YdHJhR3JpZC5Db2x1bW5zLkdyaWRDb2x1bW5Tb3J0SW5mbwIAAAAJU29ydE9yZGVyCkNvbHVtbk5hbWUAAQgIAAAAAgAAAAYJAAAADWNvbE1vZGlmaWVkT24L</property>    <property name=\"FormatConditions\" iskey=\"true\" value=\"1\">      <property name=\"Item1\" isnull=\"true\" iskey=\"true\">        <property name=\"ColumnName\" />        <property name=\"Condition\">Expression</property>      </property>    </property>    <property name=\"GroupSummarySortInfoState\" />    <property name=\"FindFilterText\" />    <property name=\"FindPanelVisible\">false</property>  </XtraSerializer>";
            string sqlUpdate = @"DECLARE @SavedQueryId uniqueidentifier
                                 SELECT @SavedQueryId=SavedQueryId FROM SavedQuery WHERE Name='Default ProjectTask List'
                                UPDATE SavedQuery SET LayoutXml='" + layoutXml + "' WHERE SavedQueryId=@SavedQueryId";
            Execute.Sql(sqlUpdate);
        }
        public override void Down()
        {
            string layoutXml = "<XtraSerializer version=\"1.0\" application=\"View\">    <property name=\"#LayoutVersion\" />    <property name=\"GroupPanelText\" />    <property name=\"NewItemRowText\" />    <property name=\"GroupFooterShowMode\">VisibleIfExpanded</property>    <property name=\"LevelIndent\">-1</property>    <property name=\"PreviewIndent\">-1</property>    <property name=\"PreviewLineCount\">-1</property>    <property name=\"BestFitMaxRowCount\">-1</property>    <property name=\"ScrollStyle\">LiveVertScroll, LiveHorzScroll</property>    <property name=\"FocusRectStyle\">RowFocus</property>    <property name=\"HorzScrollStep\">3</property>    <property name=\"PreviewFieldName\" />    <property name=\"ViewCaptionHeight\">-1</property>    <property name=\"ShowButtonMode\">ShowForFocusedCell</property>    <property name=\"Columns\" iskey=\"true\" value=\"21\">      <property name=\"Item1\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">0</property>        <property name=\"Width\">104</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colName</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"FixedWidth\">true</property>        </property>        <property name=\"Caption\">Name</property>        <property name=\"FieldName\">Name</property>      </property>      <property name=\"Item2\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">3</property>        <property name=\"Width\">62</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colStatusCode</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"FixedWidth\">true</property>        </property>        <property name=\"Caption\">StatusCode</property>        <property name=\"FieldName\">StatusCode</property>      </property>      <property name=\"Item3\" isnull=\"true\" iskey=\"true\">        <property name=\"ColumnEditName\" />        <property name=\"Name\">colDescription</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"FixedWidth\">true</property>        </property>        <property name=\"Caption\">Description</property>        <property name=\"FieldName\">Description</property>      </property>      <property name=\"Item4\" isnull=\"true\" iskey=\"true\">        <property name=\"DisplayFormat\" isnull=\"true\" iskey=\"true\">          <property name=\"FormatString\">{0:d}</property>          <property name=\"FormatType\">DateTime</property>        </property>        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">12</property>        <property name=\"Width\">77</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colModifiedOn</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"FixedWidth\">true</property>        </property>        <property name=\"FieldName\">ModifiedOn</property>      </property>      <property name=\"Item5\" isnull=\"true\" iskey=\"true\">        <property name=\"DisplayFormat\" isnull=\"true\" iskey=\"true\">          <property name=\"FormatString\">{0:d}</property>          <property name=\"FormatType\">DateTime</property>        </property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colCreatedOn</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"FixedWidth\">true</property>        </property>        <property name=\"FieldName\">CreatedOn</property>      </property>      <property name=\"Item6\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">5</property>        <property name=\"Width\">58</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colQuoteWorkHours</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"FixedWidth\">true</property>        </property>        <property name=\"FieldName\">QuoteWorkHours</property>        <property name=\"Summary\" iskey=\"true\" value=\"1\">          <property name=\"Item1\" isnull=\"true\" iskey=\"true\">            <property name=\"FieldName\">QuoteWorkHours</property>            <property name=\"Tag\" isnull=\"true\" />            <property name=\"DisplayFormat\">{0:0.00}</property>            <property name=\"SummaryType\">Sum</property>          </property>        </property>      </property>      <property name=\"Item7\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">6</property>        <property name=\"Width\">52</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colActualWorkHours</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"FixedWidth\">true</property>        </property>        <property name=\"FieldName\">ActualWorkHours</property>        <property name=\"Summary\" iskey=\"true\" value=\"1\">          <property name=\"Item1\" isnull=\"true\" iskey=\"true\">            <property name=\"FieldName\">ActualWorkHours</property>            <property name=\"Tag\" isnull=\"true\" />            <property name=\"DisplayFormat\">{0:0.00}</property>            <property name=\"SummaryType\">Sum</property>          </property>        </property>      </property>      <property name=\"Item8\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">7</property>        <property name=\"Width\">56</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colActualInput</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"FixedWidth\">true</property>        </property>        <property name=\"FieldName\">ActualInput</property>        <property name=\"Summary\" iskey=\"true\" value=\"1\">          <property name=\"Item1\" isnull=\"true\" iskey=\"true\">            <property name=\"FieldName\">ActualInput</property>            <property name=\"Tag\" isnull=\"true\" />            <property name=\"DisplayFormat\">{0:0.00}</property>            <property name=\"SummaryType\">Sum</property>          </property>        </property>      </property>      <property name=\"Item9\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">8</property>        <property name=\"Width\">53</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colEffort</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"FixedWidth\">true</property>        </property>        <property name=\"FieldName\">Effort</property>        <property name=\"Summary\" iskey=\"true\" value=\"1\">          <property name=\"Item1\" isnull=\"true\" iskey=\"true\">            <property name=\"FieldName\">Effort</property>            <property name=\"Tag\" isnull=\"true\" />            <property name=\"DisplayFormat\">{0:0.00}</property>            <property name=\"SummaryType\">Sum</property>          </property>        </property>      </property>      <property name=\"Item10\" isnull=\"true\" iskey=\"true\">        <property name=\"ColumnEditName\" />        <property name=\"Name\">colOvertime</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"FixedWidth\">true</property>        </property>        <property name=\"FieldName\">Overtime</property>        <property name=\"Summary\" iskey=\"true\" value=\"1\">          <property name=\"Item1\" isnull=\"true\" iskey=\"true\">            <property name=\"FieldName\">Overtime</property>            <property name=\"Tag\" isnull=\"true\" />            <property name=\"DisplayFormat\">{0:0.00}</property>            <property name=\"SummaryType\">Sum</property>          </property>        </property>      </property>      <property name=\"Item11\" isnull=\"true\" iskey=\"true\">        <property name=\"DisplayFormat\" isnull=\"true\" iskey=\"true\">          <property name=\"FormatString\">{0:d}</property>          <property name=\"FormatType\">DateTime</property>        </property>        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">9</property>        <property name=\"Width\">67</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colStartDate</property>        <property name=\"Caption\">StartDate</property>        <property name=\"FieldName\">StartDate</property>      </property>      <property name=\"Item12\" isnull=\"true\" iskey=\"true\">        <property name=\"DisplayFormat\" isnull=\"true\" iskey=\"true\">          <property name=\"FormatString\">{0:d}</property>          <property name=\"FormatType\">DateTime</property>        </property>        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">10</property>        <property name=\"Width\">67</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colEndDate</property>        <property name=\"Caption\">EndDate</property>        <property name=\"FieldName\">EndDate</property>      </property>      <property name=\"Item13\" isnull=\"true\" iskey=\"true\">        <property name=\"ColumnEditName\" />        <property name=\"Name\">colCreatedById</property>        <property name=\"FieldName\">CreatedById</property>      </property>      <property name=\"Item14\" isnull=\"true\" iskey=\"true\">        <property name=\"ColumnEditName\" />        <property name=\"Name\">colModifiedById</property>        <property name=\"FieldName\">ModifiedById</property>      </property>      <property name=\"Item15\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">11</property>        <property name=\"Width\">71</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colOwnerId</property>        <property name=\"FieldName\">OwnerId</property>      </property>      <property name=\"Item16\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">1</property>        <property name=\"Width\">134</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colProjectId</property>        <property name=\"FieldName\">ProjectId</property>      </property>      <property name=\"Item17\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">2</property>        <property name=\"Width\">63</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colProjectIterationId</property>        <property name=\"FieldName\">ProjectIterationId</property>      </property>      <property name=\"Item18\" isnull=\"true\" iskey=\"true\">        <property name=\"UnboundExpression\">[QuoteWorkHours]/[ActualWorkHours]</property>        <property name=\"UnboundType\">Decimal</property>        <property name=\"DisplayFormat\" isnull=\"true\" iskey=\"true\">          <property name=\"FormatString\">{0:0%}</property>          <property name=\"FormatType\">Numeric</property>        </property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colEvaluateExactlyRate</property>        <property name=\"Caption\">EvaluateExactlyRate</property>        <property name=\"FieldName\">colEvaluateExactlyRate</property>      </property>      <property name=\"Item19\" isnull=\"true\" iskey=\"true\">        <property name=\"UnboundExpression\">[Effort]/[ActualInput]</property>        <property name=\"UnboundType\">Decimal</property>        <property name=\"DisplayFormat\" isnull=\"true\" iskey=\"true\">          <property name=\"FormatString\">{0:0%}</property>          <property name=\"FormatType\">Numeric</property>        </property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colInputEffortRate</property>        <property name=\"Caption\">InputEffortRate</property>        <property name=\"FieldName\">colInputEffortRate</property>      </property>      <property name=\"Item20\" isnull=\"true\" iskey=\"true\">        <property name=\"UnboundExpression\">[ActualWorkHours]-[Effort]</property>        <property name=\"UnboundType\">Decimal</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colRemainderTime</property>        <property name=\"Caption\">RemainderTime</property>        <property name=\"FieldName\">colRemainderTime</property>        <property name=\"Summary\" iskey=\"true\" value=\"1\">          <property name=\"Item1\" isnull=\"true\" iskey=\"true\">            <property name=\"FieldName\">colRemainderTime</property>            <property name=\"Tag\" isnull=\"true\" />            <property name=\"DisplayFormat\">{0:0.00}</property>            <property name=\"SummaryType\">Sum</property>          </property>        </property>      </property>      <property name=\"Item21\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">4</property>        <property name=\"Width\">57</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">Priority</property>        <property name=\"Caption\">Priority</property>        <property name=\"FieldName\">PriorityCode</property>      </property>    </property>    <property name=\"ViewCaption\" />    <property name=\"BorderStyle\">Default</property>    <property name=\"SynchronizeClones\">true</property>    <property name=\"DetailTabHeaderLocation\">Top</property>    <property name=\"Name\">gridView1</property>    <property name=\"DetailHeight\">350</property>    <property name=\"ActiveFilterEnabled\">true</property>    <property name=\"VertScrollTipFieldName\" />    <property name=\"GroupFormat\">{0}: [#image]{1} {2}</property>    <property name=\"OptionsView\" isnull=\"true\" iskey=\"true\">      <property name=\"ShowFilterPanelMode\">Never</property>      <property name=\"ShowIndicator\">false</property>      <property name=\"ShowGroupPanel\">false</property>      <property name=\"ShowFooter\">true</property>      <property name=\"WaitAnimationOptions\">Panel</property>      <property name=\"ColumnAutoWidth\">false</property>    </property>    <property name=\"OptionsBehavior\" isnull=\"true\" iskey=\"true\">      <property name=\"Editable\">false</property>      <property name=\"AllowIncrementalSearch\">true</property>    </property>    <property name=\"FixedLineWidth\">2</property>    <property name=\"OptionsDetail\" isnull=\"true\" iskey=\"true\">      <property name=\"EnableMasterViewMode\">false</property>    </property>    <property name=\"ChildGridLevelName\" />    <property name=\"IndicatorWidth\">-1</property>    <property name=\"OptionsSelection\" isnull=\"true\" iskey=\"true\">      <property name=\"EnableAppearanceFocusedCell\">false</property>    </property>    <property name=\"ColumnPanelRowHeight\">-1</property>    <property name=\"VertScrollVisibility\">Auto</property>    <property name=\"GroupRowHeight\">-1</property>    <property name=\"HorzScrollVisibility\">Auto</property>    <property name=\"FooterPanelHeight\">-1</property>    <property name=\"RowSeparatorHeight\">0</property>    <property name=\"RowHeight\">-1</property>    <property name=\"ActiveFilterString\" />    <property name=\"GroupSummary\" iskey=\"true\" value=\"0\" />    <property name=\"SortInfo\">~Xtra#Base64AAEAAAD/////AQAAAAAAAAAMAgAAAF1EZXZFeHByZXNzLlh0cmFHcmlkLnYxMi4xLCBWZXJzaW9uPTEyLjEuNy4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI4OGQxNzU0ZDcwMGU0OWEFAQAAADhEZXZFeHByZXNzLlh0cmFHcmlkLkNvbHVtbnMuR3JpZENvbHVtblNvcnRJbmZvQ29sbGVjdGlvbgQAAAAKZ3JvdXBDb3VudAVjbG9uZQ9jbG9uZUdyb3VwQ291bnQTQ29sbGVjdGlvbkJhc2UrbGlzdAADAAMIsgFTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW0RldkV4cHJlc3MuWHRyYUdyaWQuQ29sdW1ucy5HcmlkQ29sdW1uU29ydEluZm8sIERldkV4cHJlc3MuWHRyYUdyaWQudjEyLjEsIFZlcnNpb249MTIuMS43LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YV1dCBxTeXN0ZW0uQ29sbGVjdGlvbnMuQXJyYXlMaXN0AgAAAAAAAAAJAwAAAAAAAAAJBAAAAAQDAAAAsgFTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW0RldkV4cHJlc3MuWHRyYUdyaWQuQ29sdW1ucy5HcmlkQ29sdW1uU29ydEluZm8sIERldkV4cHJlc3MuWHRyYUdyaWQudjEyLjEsIFZlcnNpb249MTIuMS43LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YV1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAwRGV2RXhwcmVzcy5YdHJhR3JpZC5Db2x1bW5zLkdyaWRDb2x1bW5Tb3J0SW5mb1tdAgAAAAgICQUAAAAAAAAAAAAAAAQEAAAAHFN5c3RlbS5Db2xsZWN0aW9ucy5BcnJheUxpc3QDAAAABl9pdGVtcwVfc2l6ZQhfdmVyc2lvbgUAAAgICQYAAAABAAAABgAAAAcFAAAAAAEAAAAAAAAABC5EZXZFeHByZXNzLlh0cmFHcmlkLkNvbHVtbnMuR3JpZENvbHVtblNvcnRJbmZvAgAAABAGAAAABAAAAAkHAAAADQMMCAAAABlEZXZFeHByZXNzLlh0cmFHcmlkLnYxMi4xBQcAAAAuRGV2RXhwcmVzcy5YdHJhR3JpZC5Db2x1bW5zLkdyaWRDb2x1bW5Tb3J0SW5mbwIAAAAJU29ydE9yZGVyCkNvbHVtbk5hbWUAAQgIAAAAAgAAAAYJAAAADWNvbE1vZGlmaWVkT24L</property>    <property name=\"FormatConditions\" iskey=\"true\" value=\"1\">      <property name=\"Item1\" isnull=\"true\" iskey=\"true\">        <property name=\"ColumnName\" />        <property name=\"Condition\">Expression</property>      </property>    </property>    <property name=\"GroupSummarySortInfoState\" />    <property name=\"FindFilterText\" />    <property name=\"FindPanelVisible\">false</property>  </XtraSerializer>";
            string sqlUpdate = @"DECLARE @SavedQueryId uniqueidentifier
                                SELECT @SavedQueryId=SavedQueryId FROM SavedQuery WHERE Name='Default ProjectTask List'
                                UPDATE SavedQuery SET LayoutXml='" + layoutXml + "' WHERE SavedQueryId=@SavedQueryId"; 
            Execute.Sql(sqlUpdate);
        }
    }
}
